package sjtu.ist.warehouse4ws.service.cust;

import java.util.List;

import sjtu.ist.warehouse4ws.dao.ModelgroupDaoHibernate;
import sjtu.ist.warehouse4ws.dao.cust.CustModelgroupDaoHibernate;
import sjtu.ist.warehouse4ws.model.CustModelgroup;

public class CustModelgroupServiceImpl implements CustModelgroupService{

	private CustModelgroupDaoHibernate custModelgroupDao;
	
	public void setCustModelgroupDao(CustModelgroupDaoHibernate custModelgroupDao){
		this.custModelgroupDao = custModelgroupDao;
	}
	
	@Override
	public CustModelgroup get(String id) {
		return custModelgroupDao.get(id);
	}

//	@Override
//	public Integer save(CustModelgroup modelgroup) {
//		return custModelgroupDao.save(modelgroup);
//	}

	@Override
	public void update(CustModelgroup modelgroup) {
		custModelgroupDao.update(modelgroup);
	}

	@Override
	public void delete(String id) {
		custModelgroupDao.delete(id);
	}

	@Override
	public void delete(CustModelgroup modelgroup) {
		custModelgroupDao.delete(modelgroup);
	}

	@Override
	public List<CustModelgroup> getAll() {
		// TODO Auto-generated method stub
		return custModelgroupDao.getAll();
	}

	@Override
	public List<CustModelgroup> getByName(String name) {
		// TODO Auto-generated method stub
		return custModelgroupDao.findByName(name);
	}
			
}
